/*
 Navicat Premium Data Transfer

 Source Server         : 本地
 Source Server Type    : MySQL
 Source Server Version : 50722
 Source Host           : localhost:3306
 Source Schema         : pay-order-system

 Target Server Type    : MySQL
 Target Server Version : 50722
 File Encoding         : 65001

 Date: 21/03/2021 23:08:19
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

DROP TABLE IF EXISTS `pay_order`;
CREATE TABLE `pay_order` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `code` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '订单号',
  `pay_type` tinyint(10) NOT NULL COMMENT '汇款方式：0支付宝，1跨行，2信用卡，3银行转账',
  `rate_type` tinyint(10) DEFAULT NULL COMMENT '币种',
  `bank_no` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '卡号：支付宝时为支付宝账号',
  `bank_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '开户行',
  `country` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '国家',
  `swift_code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT 'swiftCode 银行码',
  `payeer` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '付款人',
  `amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '金额',
  `create_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `status` tinyint(10) NOT NULL DEFAULT '0' COMMENT '订单状态：0待审核，1已通过，2 不通过',
  `payee_id` bigint(20) DEFAULT NULL,
  `rate_name` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '转账币种',
  `rate` double(10,2) NOT NULL DEFAULT '0.00' COMMENT '费率',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of pay_order
-- ----------------------------
BEGIN;
INSERT INTO `pay_order` VALUES (4, '202103801720022', 0, 1, '13860157982', NULL, NULL, NULL, '黄绵宏', 1000.00, '2021-03-21 17:24:10', '2021-03-21 17:24:22', 0, 29, '', 0.00);
INSERT INTO `pay_order` VALUES (5, '202103801722015', 0, 2, '13860157982', NULL, NULL, NULL, '黄绵宏', 10000.00, '2021-03-21 17:24:06', '2021-03-21 17:24:18', 0, 29, '', 0.00);
INSERT INTO `pay_order` VALUES (6, '202103801723002', 0, 4, '13860157982', NULL, NULL, NULL, '黄绵宏', 10000.00, NULL, NULL, 0, 29, '', 0.00);
INSERT INTO `pay_order` VALUES (7, '202103801741032', 3, 2, '6217581700000016929', '中国银行', NULL, NULL, '黄绵宏', 10000.00, '2021-03-21 17:41:32', '2021-03-21 18:19:48', 1, 29, 'USDH', 0.30);
COMMIT;

-- ----------------------------
-- Table structure for pay_rate
-- ----------------------------
DROP TABLE IF EXISTS `pay_rate`;
CREATE TABLE `pay_rate` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8_bin NOT NULL,
  `rate` double(10,2) DEFAULT '0.00' COMMENT '费率：默认0',
  PRIMARY KEY (`id`,`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of pay_rate
-- ----------------------------
BEGIN;
INSERT INTO `pay_rate` VALUES (2, 'USDH', 0.30);
INSERT INTO `pay_rate` VALUES (3, 'HJK', 0.03);
INSERT INTO `pay_rate` VALUES (4, 'JKU', 0.03);
COMMIT;

-- ----------------------------
-- Table structure for permission
-- ----------------------------
DROP TABLE IF EXISTS `permission`;
CREATE TABLE `permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) DEFAULT NULL COMMENT '菜单名称',
  `pid` int(11) DEFAULT NULL COMMENT '父菜单id',
  `zindex` int(2) DEFAULT NULL COMMENT '菜单排序',
  `istype` int(1) DEFAULT NULL COMMENT '权限分类（0 菜单；1 功能）',
  `descpt` varchar(50) DEFAULT NULL COMMENT '描述',
  `code` varchar(20) DEFAULT NULL COMMENT '菜单编号',
  `icon` varchar(30) DEFAULT NULL COMMENT '菜单图标名称',
  `page` varchar(50) DEFAULT NULL COMMENT '菜单url',
  `insert_time` datetime DEFAULT NULL COMMENT '添加时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of permission
-- ----------------------------
BEGIN;
INSERT INTO `permission` VALUES (1, '系统管理', 0, 1, 0, '系统管理', 'system', '', '/', '2017-12-20 16:22:43', '2021-03-19 19:26:26');
INSERT INTO `permission` VALUES (2, '员工管理', 1, 1100, 0, '员工管理', 'usermanage', '', '/user/userList', '2017-12-20 16:27:03', '2021-03-20 10:23:12');
INSERT INTO `permission` VALUES (3, '角色管理', 1, 1200, 0, '角色管理', 'rolemanage', '', '/auth/roleManage', '2017-12-20 16:27:03', '2021-03-09 19:26:42');
INSERT INTO `permission` VALUES (4, '权限管理', 1, 1300, 0, '权限管理', 'permmanage', NULL, '/auth/permList', '2017-12-30 19:17:32', '2021-03-09 19:26:48');
INSERT INTO `permission` VALUES (15, '订单管理', 0, 2, 0, '订单管理', 'order', NULL, '/', '2021-03-19 19:25:38', '2021-03-19 19:26:36');
INSERT INTO `permission` VALUES (16, '订单列表', 15, 2001, 0, '订单列表', 'orderList', NULL, '/payOrder/index', '2021-03-19 19:27:51', '2021-03-21 15:58:53');
INSERT INTO `permission` VALUES (18, '会员管理', 0, 3, 0, '会员管理', 'member', NULL, '/', '2021-03-20 10:20:38', NULL);
INSERT INTO `permission` VALUES (19, '会员列表', 18, 3001, 0, '会员列表', 'memberList', NULL, '/user/memberList', '2021-03-20 10:22:06', NULL);
INSERT INTO `permission` VALUES (20, '费率管理', 0, 6, 0, '费率管理', 'payRate', NULL, '/', '2021-03-21 00:30:34', NULL);
INSERT INTO `permission` VALUES (21, '费率列表', 20, 6001, 0, '费率列表', 'payRate', NULL, '/payRate/index', '2021-03-21 00:31:25', NULL);
COMMIT;

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `id` int(5) NOT NULL AUTO_INCREMENT,
  `role_name` varchar(30) DEFAULT NULL COMMENT '角色名称',
  `descpt` varchar(50) DEFAULT NULL COMMENT '角色描述',
  `code` varchar(20) DEFAULT NULL COMMENT '角色编号',
  `insert_uid` int(11) DEFAULT NULL COMMENT '操作用户id',
  `insert_time` datetime DEFAULT NULL COMMENT '添加数据时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of role
-- ----------------------------
BEGIN;
INSERT INTO `role` VALUES (1, '超级管理', '超级管理员', 'superman', NULL, '2021-03-09 19:28:53', '2021-03-21 00:31:52');
INSERT INTO `role` VALUES (2, '高级管理员', '高级管理员', 'highmanage', NULL, '2021-03-17 13:53:23', '2021-03-18 13:39:29');
INSERT INTO `role` VALUES (3, '经理', '经理', 'bdmanage', NULL, '2021-03-18 13:41:47', '2018-04-22 21:15:38');
INSERT INTO `role` VALUES (4, '质检员', '质检员', 'checkmanage', NULL, '2021-03-18 14:03:00', '2018-04-22 21:15:59');
INSERT INTO `role` VALUES (5, '客维员', '客维员', 'guestmanage', NULL, '2021-03-18 14:06:48', '2018-04-22 21:16:07');
INSERT INTO `role` VALUES (6, '会员', '充值会员', 'member', NULL, '2021-03-20 09:23:57', NULL);
COMMIT;

-- ----------------------------
-- Table structure for role_permission
-- ----------------------------
DROP TABLE IF EXISTS `role_permission`;
CREATE TABLE `role_permission` (
  `permit_id` int(5) NOT NULL AUTO_INCREMENT,
  `role_id` int(5) NOT NULL,
  PRIMARY KEY (`permit_id`,`role_id`) USING BTREE,
  KEY `perimitid` (`permit_id`) USING BTREE,
  KEY `roleid` (`role_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of role_permission
-- ----------------------------
BEGIN;
INSERT INTO `role_permission` VALUES (1, 1);
INSERT INTO `role_permission` VALUES (1, 2);
INSERT INTO `role_permission` VALUES (2, 1);
INSERT INTO `role_permission` VALUES (2, 2);
INSERT INTO `role_permission` VALUES (3, 1);
INSERT INTO `role_permission` VALUES (3, 2);
INSERT INTO `role_permission` VALUES (4, 1);
INSERT INTO `role_permission` VALUES (5, 2);
INSERT INTO `role_permission` VALUES (5, 3);
INSERT INTO `role_permission` VALUES (5, 5);
INSERT INTO `role_permission` VALUES (6, 2);
INSERT INTO `role_permission` VALUES (6, 3);
INSERT INTO `role_permission` VALUES (6, 4);
INSERT INTO `role_permission` VALUES (6, 5);
INSERT INTO `role_permission` VALUES (8, 2);
INSERT INTO `role_permission` VALUES (8, 3);
INSERT INTO `role_permission` VALUES (8, 5);
INSERT INTO `role_permission` VALUES (10, 2);
INSERT INTO `role_permission` VALUES (10, 3);
INSERT INTO `role_permission` VALUES (10, 4);
INSERT INTO `role_permission` VALUES (11, 2);
INSERT INTO `role_permission` VALUES (11, 3);
INSERT INTO `role_permission` VALUES (11, 5);
INSERT INTO `role_permission` VALUES (12, 2);
INSERT INTO `role_permission` VALUES (12, 3);
INSERT INTO `role_permission` VALUES (13, 2);
INSERT INTO `role_permission` VALUES (13, 3);
INSERT INTO `role_permission` VALUES (13, 5);
INSERT INTO `role_permission` VALUES (14, 2);
INSERT INTO `role_permission` VALUES (14, 3);
INSERT INTO `role_permission` VALUES (14, 5);
INSERT INTO `role_permission` VALUES (15, 1);
INSERT INTO `role_permission` VALUES (16, 1);
INSERT INTO `role_permission` VALUES (16, 6);
INSERT INTO `role_permission` VALUES (18, 1);
INSERT INTO `role_permission` VALUES (19, 1);
INSERT INTO `role_permission` VALUES (20, 1);
INSERT INTO `role_permission` VALUES (21, 1);
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `mobile` varchar(15) DEFAULT '' COMMENT '手机号',
  `email` varchar(50) DEFAULT '' COMMENT '邮箱',
  `password` varchar(50) DEFAULT '' COMMENT '密码',
  `insert_time` datetime DEFAULT NULL COMMENT '注册时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `is_del` tinyint(1) DEFAULT '0' COMMENT '是否删除（0：正常；1：已删）',
  `is_job` tinyint(1) DEFAULT '0' COMMENT '是否在职（0：正常；1，离职）',
  `mcode` varchar(10) DEFAULT '' COMMENT '短信验证码',
  `send_time` datetime DEFAULT NULL COMMENT '短信发送时间',
  `is_staff` tinyint(2) DEFAULT '0' COMMENT '是否员工',
  `version` int(10) DEFAULT '0' COMMENT '更新版本',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `name` (`username`) USING BTREE,
  KEY `id` (`id`) USING BTREE,
  KEY `mobile` (`mobile`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户表';

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (1, 'admin', '13860157982', 'aaa', 'e10adc3949ba59abbe56e057f20f883e', '2017-12-29 17:27:23', '2021-03-19 16:22:31', 0, 0, '181907', '2021-03-17 13:42:45', 0, 0);
INSERT INTO `user` VALUES (2, '666', '13888888888', '106709@qq.com', 'e10adc3949ba59abbe56e057f20f883e', '2021-03-19 15:50:21', NULL, 0, 0, NULL, NULL, 0, 0);
INSERT INTO `user` VALUES (29, 'root', '13388888888', '1067109371@qq.com', 'e10adc3949ba59abbe56e057f20f883e', '2021-03-20 09:35:02', '2021-03-20 09:37:36', 0, 0, NULL, NULL, 1, 0);
INSERT INTO `user` VALUES (30, 'demo', '13328413490', '1162660201@qq', 'e10adc3949ba59abbe56e057f20f883e', '2021-03-21 19:06:23', '2021-03-21 19:06:23', 0, 0, NULL, NULL, 1, 0);
INSERT INTO `user` VALUES (31, 'sdsad', '1212', '', 'e10adc3949ba59abbe56e057f20f883e', '2021-03-21 19:09:14', '2021-03-21 19:09:14', 0, 0, NULL, NULL, 1, 0);
INSERT INTO `user` VALUES (32, 'ded', '22', '22', 'e10adc3949ba59abbe56e057f20f883e', '2021-03-21 19:09:54', '2021-03-21 19:09:54', 0, 0, NULL, NULL, 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for user_role
-- ----------------------------
DROP TABLE IF EXISTS `user_role`;
CREATE TABLE `user_role` (
  `user_id` int(11) NOT NULL,
  `role_id` int(5) NOT NULL,
  PRIMARY KEY (`user_id`,`role_id`) USING BTREE,
  KEY `userid` (`user_id`) USING BTREE,
  KEY `roleid` (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of user_role
-- ----------------------------
BEGIN;
INSERT INTO `user_role` VALUES (1, 1);
INSERT INTO `user_role` VALUES (2, 2);
INSERT INTO `user_role` VALUES (29, 6);
INSERT INTO `user_role` VALUES (30, 6);
INSERT INTO `user_role` VALUES (31, 6);
INSERT INTO `user_role` VALUES (32, 6);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
